﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows.Media;
using GBlason.Control.Aggregate;
using GBlason.Control.CustomUserControl;
using GBlason.ViewModel;
using GBlason.ViewModel.CoatOfArm;
using GBlason.ViewModel.General;

namespace GBlason.Common.Tools
{
    public class DesignTimeViewModel
    {
        public static GlobalApplicationViewModel GlobalAppViewModel
        {
            get
            {
                var designTime = GlobalApplicationViewModel.GetApplicationViewModel;
                //designTime.ApplicationTitle = "Design Time";
                designTime.MainWindowHeight = 600;
                designTime.MainWindowWidth = 800;
                designTime.MainWindowState = System.Windows.WindowState.Normal;
                designTime.MainWindowTop = 0;
                designTime.MainWindowLeft = 0;
                return designTime;
            }
        }

        #region shape viewer

        public static ShapeViewerUC DesignTimeShapeViewer
        {
            get{ return new ShapeViewerUC()
                            {
                                Shape = ShapeViewModelDesignResource,
                                Stroke = new SolidColorBrush(Color.FromRgb(0,0,0)),
                                Fill = new SolidColorBrush(Color.FromRgb(0,0,255)),
                                StrokeThickness = 1
                            };}
        }

        #endregion

        #region resource editor

        public static ShapeViewModel ShapeViewModelDesignResource
        {
            get
            {
                return new ShapeViewModel
                {
                    Geometry = "M 30,15 C 50,15 70,0 80,0 Q 95,0 100,5 Q 105,0 120,0 C 130,0 150,15 170,15 Q 170,40 180,50 C 165,60 165,90 195,90 C 220,200 110,180 100,200 C 90,180 -20,200 5,90 C 35,90 35,60 20,50 Q 30,40 30,15"
                };
            }
        }

        public ResourcePage DesignTimeResourcePage
        {
            get
            {
                return new ResourcePage
                           {
                               DataResources = new ObservableCollection<EditableResourceViewModel>()
                           };
            }
        }

        #endregion

    }
}
